package com.ruoyi.manager.controller;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.manager.service.StatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * 统计
 */
@RestController
@RequestMapping("/manager/statistics")
public class StatisticsController {

    @Autowired
    private StatisticsService statisticsService;

    /**
     * 统计场馆数量
     * @return
     */
    @GetMapping("courtSum")
    public AjaxResult courtSum() {
        System.out.println("统计场馆数量接口courtSum");
        List<Map<String , Integer>> lists = statisticsService.courtSum();
        return AjaxResult.success(lists);
    }


    /**
     * 统计场馆会员数量
     * @return
     */
    @GetMapping("courtMember")
    public AjaxResult courtMember() {
        System.out.println("统计场馆会员数量接口courtMember");
        List<Map<String , Integer>> lists = statisticsService.courtMember();
        return AjaxResult.success(lists);





























































































































































































































    }

}
